cmake_minimum_required(VERSION 3.10)
project(Project)

add_subdirectory(Alib)
add_subdirectory(Blib)
add_subdirectory(Eexe)

# add_custom_command(TARGET E POST_BUILD
#     COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:A> $<TARGET_FILE_DIR:E>
#     COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:B> $<TARGET_FILE_DIR:E>
# )

add_custom_target(copy_dlls ALL
    COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:A> $<TARGET_FILE_DIR:E>
    COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:B> $<TARGET_FILE_DIR:E>
    DEPENDS A B E
)